<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="it.polimi.swim.entity.SystemUser,java.util.List"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="myStyle.css">
<title>Friendship Requests</title>
</head>
<body>
<div id='header' >
	<div style="float:left"><a href="homeUser.jsp">SWIMv2</a></div>
	<div style="float:right;"><a href="SignoutServlet">Sign out</a></div>
</div>
<div id="content">
<h4>My sended Friendship Request</h4>
<%
List<SystemUser> users = (List<SystemUser>)request.getAttribute("myFriendList");
for(SystemUser f:users)
	out.print("Receiver: "+f.getName()+ " "+f.getSurname()+"<br>");
%>
<h4>My Received Friendship Request</h4>
<%
List<SystemUser> u = (List<SystemUser>)request.getAttribute("otherFriendRequestList");
for(SystemUser f:u){
System.out.print(f.getId());
%>
	<form action="AcceptFriendServlet" method="post">
	<input type="hidden" value='<%out.print(f.getId());%>' name="idSender">
	<%
		out.print("Sender:"+f.getName()+ " "+f.getSurname()+"<br>");
	%>
	<input type="submit" value="Accept">
	</form>
<%} %>
</div>
</body>
</html>